Solving a linear system of two equations